from django.urls import path, re_path
from .views import *
from rest_framework_jwt.views import obtain_jwt_token  # 用户名+密码 =>  token

from rest_framework.routers import DefaultRouter, SimpleRouter

router = SimpleRouter()
router.register('books', BookInfoModelViewSet)
urlpatterns = [
    # path('books/', BookView.as_view()),
    # path('books/<int:pk>/', BookView.as_view()),
    path('login/', obtain_jwt_token),
    # path('books/', BookInfoAPIView.as_view()),
    # path('books/', BookInfoModelViewSet.as_view({'get': 'list'})),
    # path('books/is_del/', BookInfoModelViewSet.as_view({'get': 'is_del'})),
    # path('books/set_del/', BookInfoModelViewSet.as_view({'get': 'set_del'})),
    # path('books/<int:pk>/only_title/', BookInfoModelViewSet.as_view({'get': 'only_title'})),
    # path('books/<int:pk>/', BookInfoModelViewSet.as_view({'get': 'list'})),
    # path('heros/', HeroInfoAPIView.as_view()),

]
urlpatterns += router.urls
print(router.urls)
